package cn.itcast.demo.pojo;

import com.leyou.starter.elastic.annotaions.Id;
import com.leyou.starter.elastic.annotaions.Index;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author 虎哥
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
//声明实体类相关的索引库名称，如果没指定，会以类名首字母小写后做索引库名称
@Index("goods")
public class Goods {
    //实体类中的id字段的类型，名称可以不叫id，只要加注解就可以
    @Id
    private Long id;
    private List<String> name;
    private String title;
    private Long price;
}